-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] 회원가입 API 구현 #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuthController.register(String, RegisterRequest)
메소드의 token
에 대해서만 알려주세오
@PostMapping("/register/{token}") | ||
public ResponseEntity<AuthResponse> register(@PathVariable String token, @RequestBody @Valid RegisterRequest request) { | ||
return userService.registerUser(request); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
회원가입인것 같은데 token의 역할이 뭔지 궁금합니다.
사용자 가입을 할때는 애초애 아무정보가 없어야 하지않나 생각이 드네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다요
나중에 소셜로그인쪽 할 때 추가될 수도 있을 것 같습니다
아니면 소셜로그인 회원가입은 따로 빼야겠네요
User user = userRepository.save(User.builder() | ||
.email(request.getEmail()) | ||
.password(request.getPassword()) | ||
.nickName(request.getNickName()) | ||
.thumbnail(request.getThumbnail()) | ||
.build()); | ||
|
||
AuthResponse res = AuthResponse.builder() | ||
.token(jwtTokenProvider.generateToken(user.getId(), user.getEmail(),user.getNickName(), user.getRole())) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅇㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
회원가입 API 구현